package org.example.myframework.frame.demo.domain.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import java.io.Serializable;

/**
 * @name: 分页请求封装类
 * @author: xyy
 * @create: 2021/5/13 21:58
 * @description: 分页请求参数
 */
@ApiModel(value = "分页请求参数", description = "分页请求参数")
@Data
public class PageRo<T> implements Serializable {

    private static final long serialVersionUID = -1549558910371424498L;

    @ApiModelProperty(value = "请求页码，默认为1", example = "1")
    private Integer pageIndex = 1;

    @ApiModelProperty(value = "每页条数，默认为10", example = "10")
    private Integer pageSize = 10;

    @ApiModelProperty(value = "正序排序字段，默认为空")
    private String[] ascs;

    @ApiModelProperty(value = "反序排序字段，默认为空",  allowEmptyValue = true)
    private String[] descs;

    @Valid
    @ApiModelProperty(value = "请求参数")
    private T params;


}
